package com.ftg.learn.chapter02;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 集合的泛型
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/12/4 上午10:35
 */
public class LearnCollectionType {

    public static void main(String[] args) {
        List<String> list = new ArrayList<>(2);
        list.add("1");

        List l2 = new ArrayList(2);
        //"2" - new Object("2") - 转换了
        l2.add("2");

        Map<String,String> map = new HashMap<>();
        //new node[16]  0 - 15
        map.put("name","kjx");
        //16
        Map map2 = new HashMap<>(2);
//          11
//        & 10
//      -------
//          10
        System.out.println("name".hashCode());
        //3373707

        //数组 [>64] + 链表[>8] + 红黑树
        //数组 [<64] + 链表[>8] + 数组探
        System.out.println(3373707 & 15);
    }

}

